Questions
6 of 14
1What does HNSW stand for, and at a high level, how does it achieve sub-linear approximate nearest-neighbor search?
2What do the HNSW parameters m and ef_construct control, and what trade-off do they represent?
3What does the query-time parameter ef (search breadth) control, and how would you use it to trade off recall against latency?
4Why might increasing m significantly improve recall on one dataset but barely help - or even hurt latency - on another?
5Why does Qdrant set m: 0 on a named vector used purely for reranking (e.g. a ColBERT multivector)?
6What problem does vector quantization solve, and what is the fundamental trade-off it introduces?
7Compare scalar quantization, product quantization, and binary quantization in Qdrant in terms of compression ratio and accuracy impact.
8What are oversampling and rescoring in the context of binary quantization, and why are they necessary?
9What newer quantization options - beyond the original scalar, product, and binary trio - has Qdrant introduced to fine-tune the compression/accuracy curve?
10What is Inline Storage, and how does embedding quantized vectors directly into HNSW graph nodes improve disk-based search performance?
11What is a multivector point, and how does it differ from a point with several named vectors?
12How does late-interaction scoring (as used by ColBERT-style models) with MaxSim differ from comparing two single dense vectors?
13Why is late-interaction reranking typically applied to a small candidate set rather than the entire collection?
14Design a three-stage retrieval pipeline using dense retrieval, sparse retrieval, fusion, and ColBERT reranking. What does each stage contribute?
06 / 14

What problem does vector quantization solve, and what is the fundamental trade-off it introduces?

Quantization trades memory and distance-computation speed for accuracy

Vector quantization solves the memory problem. A single float32 vector of 768 dimensions is 3072 bytes. A million of them is about 3 GB just for the raw vectors, before any index overhead. At 100 million vectors you are at 300 GB, which is more than most machines have and far more than fits comfortably in RAM. Quantization compresses each vector to a lower-precision representation - int8, or a few bits per dimension, or even one bit per dimension - which reduces the memory footprint by 4x to 32x depending on the scheme. The second, less obvious benefit is speed: lower-precision vectors fit more values per SIMD register, so distance computations are faster in addition to touching less memory. On modern CPUs, int8 dot products can be several times faster than float32 for the same number of dimensions, and binary dot products are faster still because they reduce to popcount operations.

The trade-off is accuracy. Quantization is lossy: you are approximating each vector with a lower-precision surrogate, and the distance you compute is an approximation of the true distance. The error is small for scalar quantization (int8) because 256 levels per dimension is enough to preserve the geometry of most embeddings, but it grows as you compress more aggressively. With binary quantization, each dimension is reduced to a single bit (sign), which is a very coarse approximation; the ranking it produces is noisy, and you need to retrieve more candidates and rescore them with the original vectors to recover accuracy. The fundamental trade-off is therefore memory and speed against recall. There is no quantization scheme that is free; you are always giving up some accuracy to gain some efficiency, and the right choice depends on how much accuracy your application can tolerate and how much memory you have. The mistake less experienced engineers make is assuming quantization always reduces recall. It can, but on many real datasets the recall drop with int8 scalar quantization is under one point, while memory drops 4x - a very favorable trade. The opposite mistake is assuming quantization is always safe and skipping the recall measurement entirely, which is how teams ship a 10-point recall regression without noticing.

  1. 1

    Memory: float32 -> int8 is 4x; float32 -> binary is 32x; product quantization can land anywhere in between depending on the number of subspaces.

  2. 2

    Speed: lower precision means faster SIMD distance computations and better cache utilization, often a bigger win than the memory savings alone.

  3. 3

    Accuracy: scalar is the mildest, product is intermediate, binary is the most aggressive. All of them are lossy.

  4. 4

    Interactions: quantization composes with HNSW - the graph is typically built over full-precision vectors, and quantized vectors are used for the distance computations during traversal.

The main alternative to quantization is to not quantize and instead put vectors on disk, relying on HNSW on disk with inline storage. That avoids the accuracy loss entirely but trades memory for I/O latency, which is usually much worse for interactive search. Another alternative is dimensionality reduction (PCA or a learned projection) before indexing, which reduces memory without introducing quantization error but changes the geometry and requires retraining. In practice, quantization is almost always the first lever because it is cheap to apply and easy to reverse - you can re-quantize or de-quantize without re-embedding. Version note: Qdrant has expanded its quantization options considerably in recent releases, including sub-byte and asymmetric schemes, so the old three-way choice between scalar, product, and binary is no longer complete. Check the release notes for your version before assuming a particular scheme is available or has particular defaults.

javascript

Version-dependent: the quantization_config API and the available schemes (scalar, product, binary, and the newer sub-byte and asymmetric variants) have changed across Qdrant releases. always_ram, quantile, and the exact set of configurable fields are not stable across major versions. Pin your client and server versions together when relying on quantization, and re-run your recall benchmark after any upgrade that touches the quantization path.

Difficulty: 6/10
Topics: Quantization, Memory Optimization, Vector Search Tuning

Scenario Questions

0-2 years experience
  1. 1

    You enable scalar quantization on a 2M-vector collection and memory drops from 8 GB to 2.5 GB. How do you check whether recall changed?

  2. 2

    A teammate says quantization is lossless because int8 has 256 levels. Explain why that is not correct and what the actual error looks like.

2-5 years experience
  1. 1

    You need to cut a 40 GB index down to fit on a 16 GB machine. Walk through the quantization options in order of increasing aggressiveness and what recall impact you expect at each step.

  2. 2

    Your application cannot tolerate more than a 1-point recall drop. Which quantization scheme do you pick and how do you validate it before rolling out?

5-8 years experience
  1. 1

    Design a quantization strategy for a multi-tenant collection where some tenants have 1k vectors and others have 50M. How do you avoid penalizing small tenants with aggressive compression they do not need?

  2. 2

    You quantize a collection and recall drops 4 points. Diagnose whether the loss is from the quantization itself, from the interaction with HNSW, or from the absence of rescoring, and describe the fix for each cause.

8+ years experience
  1. 1

    Derive the expected recall loss from scalar quantization as a function of the per-dimension quantile and the intrinsic dimensionality of the data. Where does the derivation fail and why?

  2. 2

    You must serve a 1B-vector collection with a hard 20ms p99 and a recall target of 0.95. Propose a quantization and index design that meets both, and identify the single biggest risk to the design.

Follow-up Questions

  • How do you measure the recall impact of enabling quantization on a collection that is already serving traffic, without rolling back to a full-precision index?
  • Why does Qdrant build the HNSW graph over full-precision vectors even when the collection is quantized, and what would happen if the graph were built over quantized vectors instead?